﻿using System;
using AutoUpdateEngine.FileSystem;
namespace AutoUpdateEngine
{
    /// <summary>
    /// IOperation 的摘要说明
    /// </summary>
    public interface IOperation
    {
        /// <summary>
        /// get a clone of current <see cref="AppPart"/> instance
        /// </summary>
        AppPart AppPart
        {
            get;
            //set;
        }
        /// <summary>
        /// get the operation name such as :create,delete,move,rename...
        /// </summary>
        string Type
        {
            get;
        }
        /// <summary>
        /// execute the underlying operation
        /// </summary>
        void Do();
        /// <summary>
        /// set a <see cref="IFileAccesser"/> which will be used to access both local and network files.
        /// </summary>
        /// <param name="fileAccesser">any implementaion of <see cref="IFileAccesser"/></param>
        void AttachFileAccesser(IFileAccesser fileAccesser);
    }
}